import {request} from "@/utils/request";

/**
 * 点赞,收藏,关注
 */
export function like(targetType,targetId){
    const query = {targetType ,targetId }
    return request({
        url: '/blog/web/like',
        method:'post',
        params:query
    })
}
/**
 *  获取点赞,收藏,关注状态
 */
export function getLikeState(targetType,targetId){
    const query = {targetType ,targetId }
    return request({
        url: '/blog/web/like/get/dislike',
        method:'get',
        params:query
    })
}

/**
 * 获取点赞,收藏,关注 计数
 */
export function getLikeCount(targetType,targetId){
    const query = {targetType ,targetId }
    return request({
        url: '/blog/web/like/select/count',
        method:'get',
        params:query,
        headers: {
            isToken: false
        },
    })
}


